package com.qdu.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.qdu.entity.Structure;
import com.qdu.mapper.StructureMapper;
import com.qdu.service.StructureService;

@Service
public class StructureServiceImpl implements StructureService{

	@Autowired
	StructureMapper structureMapper;
	
	@Override
	public Structure getStructureById(int strid) {
		return structureMapper.getStructureById(strid);
	}

	@Override
	public List<Structure> getStructureByCoursePlan(int cpid) {
		return structureMapper.getStructureByCoursePlan(cpid);
	}

	@Override
	public List<Structure> getStructureByClassroom(int classrmid) {
		return structureMapper.getStructureByClassroom(classrmid);
	}

	@Override
	public List<Structure> getAllStructure() {
		return structureMapper.getAllStructure();
	}

	@Override
	public boolean addStructure(Structure structure, int cpid, int classrmid) {
		return structureMapper.addStructure(structure, cpid, classrmid);
	}

	@Override
	public boolean modifyStructure(Structure structure, int cpid, int classrmid) {
		return structureMapper.modifyStructure(structure, cpid, classrmid);
	}

	@Override
	public boolean deleteStructureById(int strid) {
		return structureMapper.deleteStructureById(strid);
	}

	@Override
	public List<Structure> getStructureByCoursePlanAndCycle(int cpid, int cycle) {
		return structureMapper.getStructureByCoursePlanAndCycle(cpid, cycle);
	}

	@Override
	public List<Structure> getStructureByClassroomAndCycle(int classrmid, int cycle) {
		return structureMapper.getStructureByClassroomAndCycle(classrmid, cycle);
	}

}
